const path = require('path');

  module.exports = {
    entry: {
      login: './src/login.js',
      init: './src/init.js',
      main: './src/entry_main.js',
      index: './src/entry_index.js',
    },
    resolve: {
      alias: {
        'vue': 'vue/dist/vue.js',
        'vue-router$': 'vue-router/dist/vue-router.common.js'
      }
    },
    output: {
      filename: '[name].bundle.js',
      path: path.resolve(__dirname, 'dist'),
      publicPath: '/dist/',
    },
    devServer: {
      contentBase: './dist'
    },
    devtool: 'inline-source-map',
    mode:'development',
    module: {
      rules: [
        {
          test: /\.css$/,
          use: [
            'style-loader',
            'css-loader'
          ]
        },
        {
            test: /\.vue$/,
            loader: 'vue-loader'
        },
        {
          test: /\.(woff|woff2|eot|ttf|otf)$/,
          use: [
            'file-loader'
          ]
        },
        {
          test: /\.(csv|tsv)$/,
          use: [
            'csv-loader'
          ]
        },
        {
          test: /\.xml$/,
          use: [
            'xml-loader'
          ]
        },
        {    
            test: /\.js$/,    
            exclude: /node_modules/,    
            loader: 'babel-loader'    
        }
      ]
    }
  };
